import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import api from "./http/api";
import http from "./http/http";
import { handleFailResp } from "./http/handleFailResponse";
import "./http/axios";

import messageUtil from './utils/messageUtil'
import formatUtil from './utils/formatUtil'

import VueCookie from 'vue-cookie'
Vue.use(VueCookie)   // 挂在在全局了

// 对后端接口 进行全局注册，将api挂载到vue的原型上
Vue.prototype.$api = api;
// 对请求方式 进行全局注册
Vue.prototype.$http = http;
Vue.prototype.$handleFailResp = handleFailResp

//工具类全局注册
Vue.prototype.$myMessage = messageUtil
Vue.prototype.$myFormat = formatUtil


Vue.config.productionTip = false



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
